package com.atguigu.lease.web.admin.service;

import com.atguigu.lease.model.entity.ApartmentInfo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentDetailVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentItemVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentQueryVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentSubmitVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author liubo
* @description 针对表【apartment_info(公寓信息表)】的数据库操作Service
* @createDate 2023-07-24 15:48:00
*/
public interface ApartmentInfoService extends IService<ApartmentInfo> {

    Page<ApartmentItemVo> getApartmentItemVoPage(Page<ApartmentItemVo> page, ApartmentQueryVo queryVo);

    ApartmentDetailVo getApartmentDetailVo(Long id);

    /**
     *
     * @param apartmentSubmitVo 包含公寓配套id,公寓标签id,公寓杂费值,公寓图片id
     * 为什么又要创建一个ApartmentSubmitVo，而不直接引用ApartmentDetailVo呢
     *  因为，只需要拿到id值，去删除和增加，不需要在配套表中进行详细的增删改，只需要在中间表中进行操作就可以了
     */
    void saveApartmentSubmitVo(ApartmentSubmitVo apartmentSubmitVo);

    void removeByApartmentId(Long id);
}
